#include "pgconn.h"

int main(){
  modopt_t options = malloc(sizeof(struct modopt_s));
  options->host="localhost";
  options->port=5432;  
  options->db="users";
  options->user="pam";
  options->passwd="12345";
  options->debug=2;
  CONNECTION_DB conn = init_db(NULL);
  if (conn!=NULL){
  printf("%d\n", get_user_id(conn, "emc06"));
  printf("%s\n", get_user_login(conn,"1908"));
  printf("%d\n", get_group_id(conn, "c3sl"));
  printf("%s\n", get_group_name(conn,"1005"));
  printf("%s\n", get_crypt_salt(conn,"emc06", PW_CRYPT));
  free_db(conn);
  conn = init_db(options);
  printf("%d\n", get_user_id(conn,"emc06"));
  }	
}
